home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / basic / ace24dist.lha / ace24.lha / SUBmods / EasyRequest / EasyRequest.b next >
Text File  |  1996-09-11  |  991b  |  38 lines

  1. /*
  2. ** An EasyRequester SUBmod to use as a more capable
  3. ** alternative to ACE's inbuilt MsgBox function/statement.
  4. **
  5. ** Requires Release 2.0 or higher of Amiga OS.
  6. **
  7. ** By Nils Sjoholm. Modified by David Benn, July 1995, September 1996.
  8. */
  9.  
  10. #include <ace/acedef.h>
  11.  
  12. STRUCT EasyStruct
  13.     LONGINT es_StructSize
  14.     LONGINT es_Flags
  15.     ADDRESS es_Title
  16.     ADDRESS es_TextFormat
  17.     ADDRESS es_GadgetFormat
  18. END STRUCT
  19.  
  20. DECLARE FUNCTION LONGINT EasyRequestArgs(STRING title, ~
  21.                                          STRING text, ~
  22.                                          STRING gadtxt) LIBRARY intuition
  23.  
  24. SUB LONGINT EasyRequest(STRING wintitle, ~
  25.                         STRING bodytext, ~
  26.                         STRING gadgettext) EXTERNAL
  27.  
  28. DECLARE STRUCT EasyStruct es
  29.  
  30.   es->es_StructSize = SIZEOF(EasyStruct)
  31.   es->es_Flags = 0
  32.   es->es_Title = @wintitle
  33.   es->es_TextFormat = @bodytext
  34.   es->es_GadgetFormat = @gadgettext
  35.  
  36.   EasyRequest = EasyRequestArgs(null,es,null,null)
  37. END SUB
  38.